package com.idc.config.mvc;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author Trump
 * @version 1.0.0
 * @ClassName MyWebMvcConfigurer.java
 * @Description 全局mvc配置
 * @createTime 2019年08月15日 15:53:00
 */
@Configuration
public class MyWebMvcConfigurer implements WebMvcConfigurer {

    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
//        registry.addViewController("/login").setViewName("login");

        registry.addViewController("/").setViewName("success");
        registry.addViewController("/success").setViewName("success");
        registry.addViewController("/error").setViewName("error");

        registry.addViewController("/welcome").setViewName("welcome");
    }

}
